The present invention relates to a virtual machine system, and in particular, to a method for controlling interrupts in a virtual machine system and a virtual machine system implementing the interrupt control.
As conceptually shown in FIG. 1, conventional virtual machine system enables a plurality of operating systems (to be abbreviated as OS hereinbelow) 506, 507 to be executed in a bare machine 501 apparently at the same time. To this end, there is not provided a direct base machine interface between each OS 506, 507 and the bare machine 501 but a special control program (for example, a virtual machine monitor) 502 is prepared and operates in the bare machine 501 under control of a base machine interface 503 to support for each OS 506, 507 a base machine interface 508 equivalent to the base machine interface 503. A machine conceptually formed when the virtual machine monitor 502 establishes the base machine interface is referred to as a virtual machine. Although FIG. 1 includes two virtual machines 504, 505 in which the operating systems 506, 507 function, respectively, an arbitrary number of virtual machines can be configured. The virtual machines 504, 505 are changed over under control of the virtual machine monitor 502 so that they operate virtually at the same time.
On the other hand, the operating systems 506, 507 support extended machine interfaces 513, 514 for user programs 515, 516 and 517, 518, respectively, thereby forming extended machines 509-512. Each extended machine 509-512 has a function to execute in the respective OS a processing in response to a processing request, for example, a supervisor call or a function call issued for a set of functions from a user program associated with the extended machine and a base machine interface function supported by the extended machine interface. Consequently, if the operating systems 506, 507 are different from each other, the extended machines (for example, 509 and 511) belonging thereto, respectively have different functions.
As described above, the virtual machine system enables a plurality of operating systems to be executed in a single bare machine virtually at the same time, which expectedly leads to the following effect.
(1) Service of a running system need not be stopped to conduct a debug or a test for a new system being developed.
(2) Since a plurality of different OS's can operate in a single bare machine, the effectiveness of hardware resource utilization is improved.
(3) A bare machine enables to virtual configuration of a machine system having a different architecture or system configuration, and hence a control program of a new machine or system can be tested even when the pertinent hardware does not exist.
For implementation of the virtual machine system, there is supported the special control program, virtual machine monitor 502. To effectively operate the virtual machines 504, 505, the virtual machine monitor 502 divides the hardware resources of the bare machine 501 with respect to time and space by use of multiprogramming technology, thereby allocating the hardware resources to each virtual machine 504, 505. Instructions for manipulating hardware resources are defined as privileged instructions to guarantee integrity of the overall virtual machine system and are allowed to be executed only in an operation mode called a privileged mode. On detecting such a privileged instruction issued from the OS 506 or 507, the virtual machine monitor 502 interprets and executes the instruction. When the execution is finished, it returns control to an OS currently running. This processing is necessary to share the resources of the bare machine 501 among the virtual machines, and the period of time required for the processing becomes an overhead time unique to the virtual machine system. In addition, since a shared main memory is realized by use of techniques associated with the virtual storage system, the period of time used to convert addresses for the virtual storage is also included in the overhead time. The overhead unique to the virtual machine system can be briefly classified as follows.
(1) Overhead due to a simulation processing of a privileged instruction
(2) Overhead caused by a simulation processing of an interrupt
(3) Overhead due to an address conversion to support the virtual storage function
(4) Overhead associated with a dispatch processing (changeover service) between virtual machines
Conventionally, the virtual machine system has been considered for use primarily in a field of large-sized general-purpose computers, namely, main frame processors. According to remarkable progress in LSI technology microcomputer technology has greatly advanced; as a result, combinations of microcomputers and peripheral devices, namely, so-called personal computers have been put to practical use. Many application programs for various personal computers are under development at present. In this situation, useful application programs developed for a personal computer are desired to be used in another personal computer. However, such application programs have been created to operate under the respective OS. For personal computers, application programs are especially linked to operating systems. We foresee that such application programs will be desired to be executed in another personal computer having different OS, and that it will be necessary to replace the OS in general to recreate portions of application programs which are closely related to the OS. This is quite inconvenient. Consequently, it will be considerably effective to adopt as a measure for solving this problem the virtual machine system enabling a plurality of operation systems to operate in a single bare machine, for example, because the size of an OS of a personal computer is quite smaller than that of an of a large-sized machine.
At present, however, such a computer is not provided with means to reduce the overhead caused by the virtual machine monitor as described above. Improvement to minimize the overhead to the maximum extent is desired when applying the virtual machine system to a personal computer.
A typical microprocessor architecture in use at present has been described, for example, in "A Microprocessor Architecture for a Changing World: The Motorola 68000" Computer, Vol. 12, pp. 43-51 (1979-2), IEEE and "iAPX 86 Family User's Manual", Intel Corporation: Document No. 205885.